package prickworlds.physics;

import java.util.ArrayList;

import org.lwjgl.util.vector.Vector2f;
import static org.lwjgl.opengl.GL11.*;

import prickworlds.structure.Drawable;


/**
 * 
 * @author Faruk Acibal, Richard Dziambor, Christian Holzreuter, Nicolas Winkler
 * 
 */
public class ConvexPolygon extends RigidBody implements Drawable {
	ArrayList<Vector2f> vertices;
	
	ConvexPolygon() {
		vertices = new ArrayList<Vector2f>();
	}

	@Override
	public void display() {
		glBegin(GL_TRIANGLE_FAN);
		
		for (int i = 0; i < vertices.size(); i++) {
			Vector2f vec = vertices.get(i);
			glVertex2f(vec.x, vec.y);
		}
		
		glEnd();
	}

	@Override
	public void update() {
		
	}
}
